home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2001 May / SGI IRIX 6.5 Applications 2001 May.iso / dev / java_dev.idb / usr / java / bin / sgi / native_threads / appletviewer.z / appletviewer
Encoding:
Text File  |  2000-05-20  |  963 b   |  47 lines

  1. #!/bin/sh
  2.  
  3. #
  4. # Check for properties file
  5. #
  6. if [ ! -r "$JAVA_HOME/lib/appletviewer.properties" ] ; then
  7.     echo "Could not read properties file: $JAVA_HOME/lib/appletviewer.properties" 1>&2 
  8.     exit 1
  9. fi
  10.  
  11. #
  12. # Create .hotjava directory
  13. #
  14. if [ ! -d "$HOME/.hotjava" ] ; then
  15.     echo "Creating $HOME/.hotjava directory"
  16.     /usr/bin/mkdir -p $HOME/.hotjava
  17. fi
  18.  
  19. #
  20. # source a script that extracts RUNTIME_ARGS and APP_ARGS
  21. #
  22. . `dirname $0`/.extract_args
  23.  
  24. #
  25. # Strip -debug from APP_ARGS
  26. #
  27. debugging=false
  28. for a in $APP_ARGS; do
  29.    case "$a" in 
  30.     -debug) debugging=true  ;;
  31.     *)      args="$args $a" ;;
  32.    esac
  33. done
  34.  
  35.  
  36. #
  37. # Run the applet viewer. We hardwire the debugger's class -- oh, well.
  38. #
  39. if test "$debugging" = "true"
  40. then
  41.     `dirname $0`/java_g $RUNTIME_ARGS sun.tools.ttydebug.TTY \
  42.                     -sgi -32 -native \
  43.                                           sun.applet.AppletViewer ${args}
  44. else
  45.     `dirname $0`/java $RUNTIME_ARGS sun.applet.AppletViewer $args
  46. fi
  47.